#!/usr/bin/env python3

import rospy
from DrEmpower_can.msg import set_torque_adaptive
# import DrEmpower as dr

def callback(data):
    import DrEmpower as dr
    dr.set_torque_adaptive(id_num=data.id_num, torque_adaptive=data.torque_adaptive)
    rospy.loginfo("set_torque_adaptive_node")


def listener():
    rospy.init_node("set_torque_adaptive", anonymous=True)
    rospy.Subscriber("set_torque_adaptive", set_torque_adaptive, callback)
    rospy.spin()


if __name__ == '__main__':
    listener()

